package com.cy.stone.framework.gracefulresponse;

import com.feiniaojin.gracefulresponse.AbstractExceptionAliasRegisterConfig;
import com.feiniaojin.gracefulresponse.ExceptionAliasRegister;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;

/**
 * 异常别名注册
 * @author Wings
 * @since 2023-12-16
 */
@Configuration
@Slf4j
public class GracefulResponseConfig extends AbstractExceptionAliasRegisterConfig {
    @Override
    protected void registerAlias(ExceptionAliasRegister register) {
        register.doRegisterExceptionAlias(StoneNotLoginException.class);
        register.doRegisterExceptionAlias(StoneNotPermissionException.class);
        register.doRegisterExceptionAlias(StoneNotRoleException.class);
        log.info("------异常别名注册成功------");
    }
}
